Skip to content

Conversation

@ajefts
Copy link
Member

@ajefts ajefts commented Aug 21, 2017

No description provided.

birdofpreyru and others added 30 commits August 10, 2017 14:47
…istings

Fixes #155

Also includes some unrelated ESLint fixes
Fixes #158

Also sets correct group ID for Veterans community
- The setup has been enhanced to support containers in the splitted code
during server-side rendering;

- Dashboard and Challenge Details pages has been splitted into separate
code chunks. It works fine, and will work even better once their
server-side rendering is enhanced.
The code-splitting setup is not finished yet (misses HMR of CSS code),
but it has no impact on the remote deployments (technically, they both
use production code, launched against dev / prod Topcoder backends);
thus, rolling this out to remote dev, to test how this setup will
perform in real life.
- Production build: changes generated stylenames to just
[hash:base64:6], which makes both CSS and JS files about twice smaller,
comparing to previous verbose class names;

- Development build: keeps verbose class names, for convenience of any
debugging ([path]___[name]___[local]);

- Test rendering: keeps the old class names to avoid a massive update of
test snapshots ([path]___[name]__[local]___[hash:base64:5] - this is
also default for "babel-plugin-react-css-modules").
It significantly speeds-up HMR. Trade-off is that browser's dev tools
become extremely slow, due to large size of CSS code (~5mb) (it is a way
larger than in prod, because generated classnames are longer, and some
dublicates of the code are not cleaned out). However, right now ~4.5mb
of CSS is the size of the main CSS bundle. In the next commits, the new
approach for code-splitting will be implemented on all existing routes,
and the size of the main CSS bundle will become a way smaller.
Presumably, even in dev, without CSS optimizations, regular pages won't
have more than ~1mb of CSS code; thus, hopefully, browser's dev tools
will work fast again.
The code of plugin has been updated to accept "justExtract" option,
which tells the plugin just to extract CSS and to avoid doing any other
staff we do not need.

Temporarly serving updated plugin from my own fork, will be switched to
the npm version as soon as the change is merged in and published.
Code-splitting implemented for all routes related to the main Topcoder
website. Also related routing has been refactored in the process, and
become a way cleaner.
+ cleaning up of the related routing code.
Fixes #145

Makes Challenge Forum tab header to work as link to the forums
- Now direct links to the new challenge details page got rendered very
fast;
- Loading indicator is now consistent between the page loading (i.e.
loading of the related code chunks) and loading challenge details into
the page;

Server-side rendering may be further enchanced (at the moment, challenge
results are not injected at the server side).
birdofpreyru and others added 6 commits August 18, 2017 20:35
Prior to this point, most of the community-related logic (loading of
meta-data, auth checks, loading of other data, and connection of all
community components to Redux) was handled by
/src/shared/containers/tc-communities/Page/index.jsx. It was a big
module with a messy logic and some performance issues, which had to be
refactored into something more maintainable.

In this commit the meta-data loading and auth checks logic have been
split into a separate Loader container, and it is ensured that it works
optimally (does not reload any data when not-necessary).
The standard Community Header and Footer logic is moved to dedicated
containers.
@ajefts ajefts merged commit e9c7e32 into master Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants